

***************
use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear







***** FIGURE 1
keep if year_month_rel<=48

collapse ministry_questions_all, by(year_month_rel country)
graph twoway (line ministry_questions_all year_month_rel if country=="austria", connect(J) xlabel(,notick) ylabel(,notick) ) (mspline ministry_questions_all year_month_rel if country=="austria", bands(15) xlabel(,notick) ylabel(,notick angle(horizontal) nogrid) ), legend(off) xtitle("months since first minister entered office") graphregion(color(white)) title("Austria")
graph save "figure1_at.gph", replace
graph twoway (line ministry_questions_all year_month_rel if country=="belgium", connect(J) xlabel(,notick) ylabel(,notick) ) (mspline ministry_questions_all year_month_rel if country=="belgium", bands(15) xlabel(,notick) ylabel(,notick angle(horizontal) nogrid) ), legend(off) xtitle("months since first minister entered office") graphregion(color(white)) title(Belgium)
graph save "figure1_be.gph", replace
graph twoway (line ministry_questions_all year_month_rel if country=="denmark", connect(J) xlabel(,notick) ylabel(,notick) ) (mspline ministry_questions_all year_month_rel if country=="denmark", bands(15) xlabel(,notick) ylabel(,notick angle(horizontal) nogrid) ), legend(off) xtitle("months since first minister entered office") graphregion(color(white)) title(Denmark)
graph save "figure1_dk.gph", replace
graph twoway (line ministry_questions_all year_month_rel if country=="germany", connect(J) xlabel(,notick) ylabel(,notick) ) (mspline ministry_questions_all year_month_rel if country=="germany", bands(15) xlabel(,notick) ylabel(,notick angle(horizontal) nogrid) ), legend(off) xtitle("months since first minister entered office") graphregion(color(white)) title(Germany)
graph save "figure1_de.gph", replace
graph twoway (line ministry_questions_all year_month_rel if country=="spain", connect(J) xlabel(,notick) ylabel(,notick) ) (mspline ministry_questions_all year_month_rel if country=="spain", bands(15) xlabel(,notick) ylabel(,notick angle(horizontal) nogrid) ), xtitle("months since first minister entered office") graphregion(color(white)) title(Spain) legend(off)
graph save "figure1_esp.gph", replace

graph combine "figure1_at.gph" "figure1_be.gph" "figure1_dk.gph" "figure1_de.gph" "figure1_esp.gph" , graphregion(color(white))
graph save figure1.gph, replace






******** FIGURE 2

use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear

graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 & ministry_id==501 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 & ministry_id==501 , lcolor(gs10) lpattern(solid) ) , xtitle("Months") ytitle("Number of questions") ylabel(,notick angle(horizontal) nogrid ) xlabel(,noticks) graphregion(color(white)) title(Austria 2014 Oberhauser-Stöger) legend(off)
graph save figure2_at.gph, replace

graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 & ministry_id==879 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 & ministry_id==879 , lcolor(gs10) lpattern(solid) ) , xtitle("Months") ytitle("Number of questions") ylabel(,notick angle(horizontal) nogrid ) xlabel(,noticks) graphregion(color(white)) title(Belgium 2005 Lanotte-Van den Bossche) legend(off)
graph save figure2_be.gph, replace

graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 & ministry_id==6221 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 & ministry_id==6221 , lcolor(gs10) lpattern(solid) ) , xtitle("Months") ytitle("Number of questions") ylabel(,notick angle(horizontal) nogrid ) xlabel(,noticks) graphregion(color(white)) title(Germany 2001 Funke-Künast) legend(off)
graph save figure2_de.gph, replace

graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 & ministry_id==9997 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 & ministry_id==9997 , lcolor(gs10) lpattern(solid) ) , xtitle("Months") ytitle("Number of questions") ylabel(,notick angle(horizontal) nogrid ) xlabel(,noticks) graphregion(color(white)) title(Denmark 2011 Nedergaard-Poulsen) legend(off)
graph save figure2_dk.gph, replace

graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 & ministry_id==16400 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 & ministry_id==16400 , lcolor(gs10) lpattern(solid) ) , xtitle("Months") ytitle("Number of questions") ylabel(,notick angle(horizontal) nogrid ) xlabel(,noticks) graphregion(color(white)) title(Spain 1999 de Palacio-Posada) legend(off)
graph save figure2_esp.gph, replace

graph combine "figure2_at.gph" "figure2_be.gph" "figure2_dk.gph" "figure2_de.gph" "figure2_esp.gph" , graphregion(color(white)) ycommon
graph save figure2.gph, replace





*****FIGURES A2
use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
keep if country=="austria"
graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 , lcolor(gs10) lpattern(solid) ) , by(ministry_id, legend(off) graphregion(color(white)) ) ///
 xtitle("Months") ytitle("Number of questions") ///
 ylabel(, notick angle(horizontal) nogrid) ///
 xlabel(, noticks) ///
 legend(off) 
graph save figure_app2_1.gph, replace



use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
keep if country=="belgium"
graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 , lcolor(gs10) lpattern(solid) ) , by(ministry_id, legend(off) graphregion(color(white)) ) ///
 xtitle("Months") ytitle("Number of questions") ///
 ylabel(, notick angle(horizontal) nogrid) ///
 xlabel(, noticks) ///
 legend(off) 
graph save figure_app2_2.gph, replace


use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
keep if country=="denmark"
graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 , lcolor(gs10) lpattern(solid) ) , by(ministry_id, legend(off) graphregion(color(white)) ) ///
 xtitle("Months") ytitle("Number of questions") ///
 ylabel(, notick angle(horizontal) nogrid) ///
 xlabel(, noticks) ///
 legend(off) 
graph save figure_app2_3.gph, replace



use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
keep if country=="germany"
graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 , lcolor(gs10) lpattern(solid) ) , by(ministry_id, legend(off) graphregion(color(white)) ) ///
 xtitle("Months") ytitle("Number of questions") ///
 ylabel(, notick angle(horizontal) nogrid) ///
 xlabel(, noticks) ///
 legend(off) 
graph save figure_app2_4.gph, replace


use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
keep if country=="spain"
graph twoway (line ministry_questions_all year_month_rel if minister_gender==1 , lcolor(black) ) (line ministry_questions_all year_month_rel if minister_gender==2 , lcolor(gs10) lpattern(solid) ) , by(ministry_id, legend(off) graphregion(color(white)) ) ///
 xtitle("Months") ytitle("Number of questions") ///
 ylabel(, notick angle(horizontal) nogrid) ///
 xlabel(, noticks) ///
 legend(off) 
graph save figure_app2_5.gph, replace










************* Table A3.1/Figure 3
use "PATH/Kroeber_et_al2025_BJPOLS_data.dta" , clear
xtset ministry_id year_month_abs

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model1_at

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model1_be

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
 estimates store model1_dk

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model1_de

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model1_esp


********** FIGURE 3
coefplot (model1_de, label(M 2, Germany) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model1_at, label(M 2, Austria) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model1_esp, label(M 2, Spain) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) /// 
 (model1_dk, label(M 2, Denmark) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model1_be, label(M 2, Belgium) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 , keep( *.minister_gender) legend(cols(1) region(lcolor(none))) xline(1, lpattern(dash) lcolor(gs12)) legend(off) title() ylabel( 1"Denmark" 1.32"Belgium" 1.16"Spain" 0.84"Austria" 0.68"Germany",noticks) xlabel(,noticks) graphregion(color(white)) eform 
graph save figure_3.gph, replace
 
******** Table A3.1
esttab model1_at model1_be model1_dk model1_de model1_esp using table_app3_1.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 












******** Table A3.2

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", re 
estimates store model1_at_re

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", re 
estimates store model1_be_re

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", re 
estimates store model1_dk_re

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", re 
estimates store model1_de_re

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", re 
estimates store model1_esp_re

hausman model1_esp_re model1_esp
hausman model1_at_re model1_at
hausman model1_dk_re model1_dk
hausman model1_be_re model1_be
hausman model1_de_re model1_de


**** Table A3.2
esttab model1_at_re model1_be_re model1_dk_re model1_de_re model1_esp_re using table_app3_2.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace














******* Table A3.3/FIGURE 4

xtpoisson ministry_questions_all i.minister_gender##i.ministry_highprestigeportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model2_be

margins, dydx(minister_gender) at(ministry_highprestigeportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Belgium) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of high prestige") recast(scatter) 
graph save figure_model2_be.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_highprestigeportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model2_dk

margins, dydx(minister_gender) at(ministry_highprestigeportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Denmark) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of high prestige") recast(scatter) 
graph save figure_model2_dk.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_highprestigeportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model2_esp

margins, dydx(minister_gender) at(ministry_highprestigeportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Spain) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of high prestige") recast(scatter) 
graph save figure_model2_esp.gph,replace

**** Figure 4
graph combine figure_model2_be.gph figure_model2_dk.gph figure_model2_esp.gph , cols(3) graphregion(color(white)) 
graph save Figure4.gph, replace

**** Table A3.3
esttab model2_be model2_dk model2_esp using table_app3_3.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace
































********Table A3.4

xtpoisson ministry_questions_written i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model3_at

xtpoisson ministry_questions_written i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model3_be

xtpoisson ministry_questions_written i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model3_dk

xtpoisson ministry_questions_written i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model3_de

*********** Table A3.4
esttab model3_at model3_be model3_dk model3_de using table_app3_4.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace













********Table A3.5/FIGURE 5
xtnbreg ministry_questions_oral i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model4_at

xtnbreg ministry_questions_oral i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model4_be

xtnbreg ministry_questions_oral i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe
estimates store model4_dk

xtpoisson ministry_questions_oral i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model4_de



********** Figure 5
coefplot (model4_at, label(M 2, Austria) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model4_de, label(M 2, Germany) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model4_dk, label(M 2, Denmark) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 (model4_be, label(M 2, Belgium) msymbol(O) mcolor(black) msize(small) ciopts( lwidth(0.1) mcolor(gs10))) ///
 , keep( *.minister_gender) legend(cols(1) region(lcolor(none))) xline(0, lpattern(dash) lcolor(gs12)) legend(off) title() ylabel( 1.1"Denmark" 0.9"Germany" 1.3"Belgium" 0.7"Austria",noticks) xlabel(,noticks) graphregion(color(white)) 
graph save figure5.gph, replace


*******Table A3.5
esttab model4_at model4_be model4_dk model4_de using table_app3_5.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace


















******************************************************************************************
****************************** APPENDIX 4 ******************************
******************************************************************************************






*** Section: Omitted variable bias


*** Test 1: Additional confounder for political outsiders
*** Table A4.2

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c i.minister_outsider year_month if country=="denmark" , fe 
estimates store model_rc1_dk


xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c i.minister_outsider year_month if country=="spain" , fe 
estimates store model_rc1_esp


******** Table A3.1
esttab model_rc1_dk model_rc1_esp using table_app4_2.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 









*** Test 2: Additional confounder for technocrats
*** Table A4.3

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c i.minister_technocrat year_month if country=="denmark" , fe 
estimates store model_rc2_dk

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c i.minister_technocrat year_month if country=="spain" , fe 
estimates store model_rc2_esp


******** Table A4.3
esttab model_rc2_dk model_rc2_esp using table_app4_3.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 






*** Section: Sensitivity to influential observations


*** Test 3: Sample excluding influential cases
*** Tables A4.4/A4.5

******* identify influential cases with substantially larger number of questions than common within the country

bysort country (ministry_id year_month_rel): egen mean_q = mean(ministry_questions_all) 
bysort country (ministry_id year_month_rel): egen sd_q = sd(ministry_questions_all)

gen z_score = (ministry_questions_all - mean_q) / sd_q
gen outlier = z_score > 3 // Flagging values >3 SDs from mean


*** LTable A4.4
list ministry_id country year_month_rel minister_gender ministry_questions_all z_score mean_q sd_q if outlier

generate outlier_id=0
replace outlier_id=1 if ministry_id==5887 | ministry_id==1025 |ministry_id==2579 | ministry_id==501 |ministry_id==3027



xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria" & outlier_id==0, fe 
estimates store model_rc3_at

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium"& outlier_id==0, fe 
estimates store model_rc3_be

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark" & outlier_id==0, fe 
estimates store model_rc3_dk

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany"& outlier_id==0, fe 
estimates store model_rc3_de


***** Table A4.5

esttab model_rc3_at model_rc3_be model_rc3_dk model_rc3_de using table_app4_5.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace







*** Section: Sampling bias


*** Test 4: Sample excluding replacements due to scandal/crisis
*** Table A4.6


xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria" & ministry_reasonreplacement!="Scandal/crisis linked to the portfolio or minister" , fe 
estimates store model_rc4_at

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium" & ministry_reasonreplacement!="Scandal/crisis linked to the portfolio or minister" , fe 
estimates store model_rc4_be

xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark" &ministry_reasonreplacement!="Scandal/crisis linked to the portfolio or minister", fe 
estimates store model_rc4_dk
 
xtpoisson ministry_questions_all i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain" & ministry_reasonreplacement!="Scandal/crisis linked to the portfolio or minister", fe 
estimates store model_rc4_esp



******** Table A4.6
esttab model_rc4_at model_rc4_be model_rc4_dk model_rc4_esp using table_app4_6.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 








*** Test 5: Additional confounders for replacement
*** Table A4.7



xtpoisson ministry_questions_all i.minister_gender i.ministry_replacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium" , fe 
estimates store model_rc5_be

xtpoisson ministry_questions_all i.minister_gender i.ministry_replacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c if country=="denmark" , fe 
estimates store model_rc5_dk
 

xtpoisson ministry_questions_all i.minister_gender i.ministry_replacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain" , fe 
estimates store model_rc5_esp

******** Table A4.7
esttab model_rc5_be model_rc5_dk model_rc5_esp using table_app4_7.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 






*** Test 6: Interaction with woman minister being a replacement
*** Tables A4.8 & A4.9, Figure A4.1

xtpoisson ministry_questions_all i.minister_gender##i.ministry_womenreplacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc6_be

estat ic
testparm i.minister_gender#i.ministry_womenreplacement

margins, dydx(minister_gender) at (ministry_womenreplacement=(0 1))
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Belgium) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0 "women first" 1"women second", noticks) ytitle("minister = woman") xtitle("who was in office first") recast(scatter) 
graph save figure_app4_1.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_womenreplacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc6_dk
 
estat ic
testparm i.minister_gender#i.ministry_womenreplacement

 
xtpoisson ministry_questions_all i.minister_gender##i.ministry_womenreplacement c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc6_esp

estat ic
testparm i.minister_gender#i.ministry_womenreplacement


******** Table A4.9
esttab model_rc6_be using table_app4_9.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 








*** Section: Conditionality of the effect of minister’s gender 	
*** Test 7: Women MPs only
*** Table A4.10

xtpoisson ministry_questions_womenmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc7_at

xtpoisson ministry_questions_womenmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc7_be

xtpoisson ministry_questions_womenmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc7_dk

xtpoisson ministry_questions_womenmps i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc7_de

xtpoisson ministry_questions_womenmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc7_esp

******** Table A4.10
esttab model_rc7_at model_rc7_be model_rc7_dk model_rc7_de model_rc7_esp using table_app4_10.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 




*** Test 8: Men MPs only
*** Table A4.11

xtpoisson ministry_questions_menmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc8_at

xtpoisson ministry_questions_menmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc8_be

xtpoisson ministry_questions_menmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
 estimates store model_rc8_dk

xtpoisson ministry_questions_menmps i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc8_de

xtpoisson ministry_questions_menmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc8_esp


******** Table A4.11
esttab model_rc8_at model_rc8_be model_rc8_dk model_rc8_de model_rc8_esp using table_app4_11.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 






*** Test 9: Men MPs from opposition parties only
*** Table A4.12



xtpoisson ministry_questions_menoppmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc9_at

xtpoisson ministry_questions_menoppmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc9_be

xtpoisson ministry_questions_menoppmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc9_dk

xtpoisson ministry_questions_menoppmps i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc9_de

xtpoisson ministry_questions_menoppmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe
estimates store model_rc9_esp

******** Table A4.12
esttab model_rc9_at model_rc9_be model_rc9_dk model_rc9_de model_rc9_esp using table_app4_12.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 






*** Test 10: Men MPs from parties with different ideological leanings than ministers
*** Table A4.13




xtpoisson ministry_questions_mencompmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc10_at

xtpoisson ministry_questions_mencompmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc10_be

xtpoisson ministry_questions_mencompmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc10_dk

xtpoisson ministry_questions_mencompmps i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc10_de

xtpoisson ministry_questions_mencompmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe
estimates store model_rc10_esp



******** Table A4.13
esttab model_rc10_at model_rc10_be model_rc10_dk model_rc10_de model_rc10_esp using table_app4_13.rtf, b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 





*** Test 11: MPs belonging to ideologically left-wing parties only
*** Table A4.14


xtpoisson ministry_questions_leftmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc11_at

xtpoisson ministry_questions_leftmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc11_be

xtpoisson ministry_questions_leftmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc11_dk

xtpoisson ministry_questions_leftmps i.minister_gender c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc11_de

xtpoisson ministry_questions_leftmps i.minister_gender c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe
estimates store model_rc11_esp




******** Table A4.14
esttab model_rc11_at model_rc11_be model_rc11_dk model_rc11_de model_rc11_esp using table_app4_14.rtf, b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 







*** Test 12: Interaction model with decades
*** Table A4.15/Figure A4.2



xtpoisson ministry_questions_all i.minister_gender##i.decade c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc12_be

margins, dydx(minister_gender) at(decade=(1990 2000 2010)) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Belgium) ylabel(,notick angle(horizontal) nogrid) xlabel(, noticks) ytitle("minister = woman") xtitle("decade") recast(scatter) 
graph save figure_app4_2_be.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.decade c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc12_dk

margins, dydx(minister_gender) at(decade=(1990 2000 2010) )
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Denmark) ylabel(,notick angle(horizontal) nogrid) xlabel(, noticks) ytitle("minister = woman") xtitle("decade") recast(scatter) 
graph save figure_app4_2_dk.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.decade c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc12_esp

margins, dydx(minister_gender) at(decade=(1990 2000 2010)) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Spain) ylabel(,notick angle(horizontal) nogrid) xlabel(, noticks) ytitle("minister = woman") xtitle("decade") recast(scatter) 
graph save figure_app4_2_esp.gph,replace



******Figure A4.2
graph combine figure_app4_2_be.gph figure_app4_2_dk.gph figure_app4_2_esp.gph , cols(3) graphregion(color(white)) ycommon


*** Table A4.3
esttab model_rc12_be model_rc12_dk model_rc12_esp using table_app4_15.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace









*** Test 13: Interaction model with time since the government entered office
*** Table A4.16 & Figure A4.3



xtpoisson ministry_questions_all i.minister_gender##c.year_month_rel_ln c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="austria", fe 
estimates store model_rc13_at
margins, dydx(minister_gender) at(year_month_rel_ln=(0 (0.5) 4) )
marginsplot, recast(line) ciopts(recast(rarea) fcolor(%20) lcolor(gs10)) ///
ylabel(, angle(horizontal)) ///
 title("Austria") ///
 graphregion(color(white)) ///
 plotregion(color(white)) ///
 ylabel(,nogrid noticks) ///
 xlabel(, noticks) xtitle("Cabinet duration") ytitle("minister = woman") ///
	 yline(0, lpattern(dash) lcolor(gs12))


graph save figure_app4_3_at.gph, replace

xtpoisson ministry_questions_all i.minister_gender##c.year_month_rel_ln c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium" & year_month_rel_ln<3.9, fe 
estimates store model_rc13_be
margins, dydx(minister_gender) at(year_month_rel_ln=(0 (0.5) 4))
marginsplot, recast(line) ciopts(recast(rarea) fcolor(%20) lcolor(gs10)) ///
ylabel(, angle(horizontal)) ///
 title("Belgium") ///
 graphregion(color(white)) ///
 plotregion(color(white)) ///
 ylabel(,nogrid noticks) ///
 xlabel(, noticks) xtitle("Cabinet duration") ytitle("minister = woman") ///
	 yline(0, lpattern(dash) lcolor(gs12))

graph save figure_app4_3_be.gph, replace

xtpoisson ministry_questions_all i.minister_gender##c.year_month_rel_ln c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc13_dk
margins, dydx(minister_gender) at(year_month_rel_ln=(0 (0.5) 4))
marginsplot, recast(line) ciopts(recast(rarea) fcolor(%20) lcolor(gs10)) ///
ylabel(, angle(horizontal)) ///
 title("Denmark") ///
 graphregion(color(white)) ///
 plotregion(color(white)) ///
 ylabel(,nogrid noticks) ///
 xlabel(, noticks) xtitle("Cabinet duration") ytitle("minister = woman") ///
	 yline(0, lpattern(dash) lcolor(gs12))


graph save figure_app4_3_dk.gph, replace


xtpoisson ministry_questions_all i.minister_gender##c.year_month_rel_ln c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="germany", fe 
estimates store model_rc13_de
margins, dydx(minister_gender) at(year_month_rel_ln=(0 (0.5) 4))
marginsplot, recast(line) ciopts(recast(rarea) fcolor(%20) lcolor(gs10)) ///
ylabel(, angle(horizontal)) ///
 title("Germany") ///
 graphregion(color(white)) ///
 plotregion(color(white)) ///
 ylabel(,nogrid noticks) ///
 xlabel(, noticks) xtitle("Cabinet duration") ytitle("minister = woman") ///
	 yline(0, lpattern(dash) lcolor(gs12))


graph save figure_app4_3_de.gph, replace


xtpoisson ministry_questions_all i.minister_gender##c.year_month_rel_ln##c.year_month_rel_ln c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe
estimates store model_rc13_esp
margins, dydx(minister_gender) at(year_month_rel_ln=(0 (0.5) 4))
marginsplot, recast(line) ciopts(recast(rarea) fcolor(%20) lcolor(gs10)) ///
ylabel(, angle(horizontal)) ///
 title("Spain") ///
 graphregion(color(white)) ///
 plotregion(color(white)) ///
 ylabel(,nogrid noticks) ///
 xlabel(, noticks) xtitle("Cabinet duration") ytitle("minister = woman") ///
	 yline(0, lpattern(dash) lcolor(gs12))



graph save figure_app4_3_esp.gph, replace




********** Figure A4.3 
graph combine figure_app4_3_at.gph figure_app4_3_be.gph figure_app4_3_dk.gph figure_app4_3_de.gph figure_app4_3_esp.gph, ycommon xcommon



******** Table A4.16
esttab model_rc13_at model_rc13_be model_rc13_dk model_rc13_de model_rc13_esp using table_app4_16.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace 







*** Section: Alternative measures of portfolio content
*** Test 14: Interaction model with heightened policy-making activities of portfolio
*** Tables A4.17 & A4.18/Figure A4.4


xtpoisson ministry_questions_all i.minister_gender##i.ministry_highpolicyportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc14_be

margins, dydx(minister_gender) at(ministry_highpolicyportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Belgium) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of heightened policy-making activity ") recast(scatter) 
graph save figure_app4_4_be.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_highpolicyportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc14_dk

margins, dydx(minister_gender) at(ministry_highpolicyportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Denmark) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of heightened policy-making activity ") recast(scatter) 
graph save figure_app4_4_dk.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_highpolicyportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc14_esp

margins, dydx(minister_gender) at(ministry_highpolicyportfolio=(0 1 )) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Spain) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"no" 1"yes", noticks) ytitle("minister = woman") xtitle("ministry of heightened policy-making activity ") recast(scatter) 
graph save figure_app4_4_esp.gph,replace

**** Figure 4.4
graph combine figure_app4_4_be.gph figure_app4_4_dk.gph figure_app4_4_esp.gph , cols(3) graphregion(color(white)) 
graph save figure_app4_4.gph,replace


**** Table A4.18
esttab model_rc14_be model_rc14_dk model_rc14_esp using table_app4_18.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace







*** Test 15: Interaction model with gendered nature of portfolio
*** Table A4.19/Figure A4.5




xtpoisson ministry_questions_all i.minister_gender##i.ministry_genderportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="belgium", fe 
estimates store model_rc15_be

margins, dydx(minister_gender) at(ministry_genderportfolio=(0 2)) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Belgium) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"feminine" 1"neutral" 2"masculine", noticks) ytitle("minister = woman") xtitle("ministry gender") recast(scatter) 
graph save figure_app4_5_be.gph,replace


xtpoisson ministry_questions_all i.minister_gender##i.ministry_genderportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="denmark", fe 
estimates store model_rc15_dk

margins, dydx(minister_gender) at(ministry_genderportfolio=(0 1 2)) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Denmark) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"feminine" 1"neutral" 2"masculine", noticks) ytitle("minister = woman") xtitle("ministry gender") recast(scatter) 
graph save figure_app4_5_dk.gph,replace

xtpoisson ministry_questions_all i.minister_gender##i.ministry_genderportfolio c.minister_mpduration_c##c.minister_mpduration_c c.minister_ministerduration_c##c.minister_ministerduration_c c.minister_ministerpfduration_c year_month if country=="spain", fe 
estimates store model_rc15_esp

margins, dydx(minister_gender) at(ministry_genderportfolio=(0 1 2)) 
marginsplot, graphregion(color(white)) yline(0, lpattern(dash) lcolor(gs12)) title(Spain) ylabel(-1.5(0.5)1.5,notick angle(horizontal) nogrid) xlabel(0"feminine" 1"neutral" 2"masculine", noticks) ytitle("minister = woman") xtitle("ministry gender") recast(scatter) 
graph save figure_app4_5_esp.gph,replace



******* Figure A4.5
graph combine figure_app4_5_be.gph figure_app4_5_dk.gph figure_app4_5_esp.gph , cols(3) graphregion(color(white)) 
graph save figure_app4_5.gph,replace


**** Table A4.19
esttab model_rc15_be model_rc15_dk model_rc15_esp using table_app4_19.rtf , b(3) se(3) label star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace

































































































































































































































































